/* --- FONT & ICONS --- */
@import url('assets/bootstrap-icons.css');

/* --- VARIABLES --- */
:root {
    --yuna-bg-color: rgba(30, 30, 35, 0.55);
    --yuna-input-bg: rgba(0, 0, 0, 0.3);
    --yuna-accent-user: rgba(77, 162, 255, 0.45);
    --yuna-accent-ai: rgba(0, 158, 140, 0.45);
}

/* --- LIQUID GLASS CORE --- */
.yuna-glass-container {
    position: relative;
    overflow: hidden;
    background-color: transparent !important;
    box-shadow: 0 25px 40px -10px rgba(0, 0, 0, 0.4) !important;
    border: none !important;
}
.yuna-glass-container::before, .yuna-glass-container::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.yuna-glass-container::before {
    backdrop-filter: blur(6px) saturate(200%);
    -webkit-backdrop-filter: blur(6px) saturate(200%);
    filter: url(#yuna-glass-distortion);
    z-index: 1;
    background: rgba(255, 255, 255, 0.05) !important;
}
.yuna-glass-container::after {
    z-index: 2;
    background-color: var(--yuna-bg-color) !important;
    background-image: linear-gradient(180deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0) 40%) !important;
    box-shadow: 0 0 2px 7px rgba(255, 255, 255, 0.05) inset, 0 0 10px 4px rgba(0, 0, 0, 0.2) inset !important;
}
.yuna-glass-container > * { position: relative !important; z-index: 4 !important; }

/* --- BUTTONS --- */
#yuna-logo-button, #yuna-ask-context-button {
    position: fixed;
    z-index: 2147483640;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 24px;
    font-family: sans-serif;
}
#yuna-logo-button { bottom: 20px; left: 20px; }
#yuna-logo-button:hover { transform: scale(1.1); }
#yuna-ask-context-button { display: none; transform: translate(-50%, -120%); }

/* --- CHAT WINDOW --- */
#yuna-chat-window {
    position: fixed;
    bottom: 80px;
    left: 20px;
    width: 380px;
    height: 550px;
    border-radius: 20px;
    display: flex;
    flex-direction: column;
    z-index: 2147483641;
    opacity: 0;
    transform: translateY(20px) scale(0.95);
    transition: opacity 0.3s ease, transform 0.3s ease;
    pointer-events: none;
}
#yuna-chat-window.yuna-active { opacity: 1; transform: translateY(0) scale(1); pointer-events: all; }

/* Header */
#yuna-chat-header { padding: 10px 15px; display: flex; justify-content: space-between; align-items: center; color: white; font-size: 16px; }
#yuna-chat-close-btn { background: none; border: none; font-size: 24px; color: white; cursor: pointer; }

/* Messages */
#yuna-chat-messages { flex-grow: 1; overflow-y: auto; padding: 10px; display: flex; flex-direction: column; gap: 10px; }
.yuna-message { max-width: 85%; padding: 10px 15px; border-radius: 18px; color: #f0f0f0; line-height: 1.5; word-wrap: break-word; }
.yuna-message.yuna-user { align-self: flex-end; border-bottom-right-radius: 5px; }
.yuna-message.yuna-user::after { background-color: var(--yuna-accent-user) !important; }
.yuna-message.yuna-ai { align-self: flex-start; border-bottom-left-radius: 5px; }
.yuna-message.yuna-ai::after { background-color: var(--yuna-accent-ai) !important; }
.yuna-message > * { z-index: 4; white-space: pre-wrap; }

/* Input Area */
#yuna-input-area { padding: 10px; display: flex; align-items: flex-end; gap: 10px; }
#yuna-chat-input {
    flex-grow: 1;
    background: var(--yuna-input-bg) !important;
    color: white !important;
    border-radius: 15px !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    padding: 10px 15px;
    resize: none;
    font-size: 14px;
    max-height: 100px;
    outline: none;
}
#yuna-chat-send-btn {
    background: var(--yuna-accent-ai) !important;
    border: none;
    width: 40px; height: 40px;
    border-radius: 50%;
    color: white;
    font-size: 20px;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}

/* Context Modal */
#yuna-context-modal {
    position: fixed;
    inset: 0;
    z-index: 2147483642;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0; pointer-events: none;
    transition: opacity 0.3s ease;
}
#yuna-context-modal.yuna-active { opacity: 1; pointer-events: all; }
.yuna-context-modal-content {
    width: 90%;
    max-width: 500px;
    border-radius: 20px;
    padding: 20px;
    display: flex; flex-direction: column; gap: 15px;
}
.yuna-context-modal-content h3 { margin: 0; color: white; }
.yuna-context-modal-content textarea {
    width: 100%;
    background: var(--yuna-input-bg) !important;
    color: white !important;
    border-radius: 15px !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    padding: 10px 15px;
    resize: vertical;
    font-size: 14px;
    min-height: 100px;
}
.yuna-context-modal-actions { display: flex; gap: 10px; justify-content: flex-end; }
.yuna-context-modal-actions button {
    padding: 8px 16px;
    border-radius: 25px;
    border: none;
    font-size: 14px;
    cursor: pointer;
}
#yuna-context-send { background: var(--yuna-accent-ai); color: white; }
#yuna-context-cancel { background: rgba(255,255,255,0.1); color: white; }